<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>demo1</title>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<a href="#">This is a test</a>
</body>
</html>

<script>

    var a = $('a');
    a.css({'color':'red'}).click(function(){
        $(this).css({'border':'2px solid #444'})
    })

</script>